FROM docker-registry.sky-group.cn/skygroup-library/jupyterlab:joern-bookworm-jdk19-base
COPY requirements.txt /root/app/requirements.txt
RUN pip install --no-cache-dir -r /root/app/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

COPY kerneldemo /root/app/kerneldemo
COPY kernelspec /root/app/kernelspec

ENV PYTHONPATH=/root/app
ENV PATH=/usr/local/joern-cli:$PATH

RUN jupyter kernelspec install  --user /root/app/kernelspec/ --name Joern
COPY run_joern.sh /root/app/run_joern.sh
WORKDIR /workdir
# "sh", "/root/app/run_joern.sh", "&&",
CMD [ "jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--no-browser"]